package de.koller.quasar;

import de.koller.aframe.util.node.NodeA;
import de.koller.oceanFramework.tree.Child;
import de.koller.quasar.engine.QEngineRoot;
import de.koller.quasar.report.QReport;
import java.util.Random;

public class QRoot extends NodeA {
	
	public static final Random RND = new Random();
	private boolean calculation = true;
	
	@Child public final QReport report = new QReport();
	@Child public final QEngineRoot engine = new QEngineRoot();
	
	public static void calculate() {
		QRoot q = new QRoot();
		
		q.initalize();
		while( q.calculation ) {
			q.updating( 1 );
			q.rendering( 1 );
		}
		q.releasing();
	}
	
	public void stopCalculation() {
		calculation = false;
	}
	
}
